﻿using System;

namespace MessagePack.Formatters
{
	// Token: 0x02000101 RID: 257
	public class NullableNilFormatter : IMessagePackFormatter<Nil?>
	{
		// Token: 0x060003AB RID: 939 RVA: 0x0000D643 File Offset: 0x0000BA43
		private NullableNilFormatter()
		{
		}

		// Token: 0x060003AC RID: 940 RVA: 0x0000D64B File Offset: 0x0000BA4B
		public int Serialize(ref byte[] bytes, int offset, Nil? value, IFormatterResolver typeResolver)
		{
			return MessagePackBinary.WriteNil(ref bytes, offset);
		}

		// Token: 0x060003AD RID: 941 RVA: 0x0000D654 File Offset: 0x0000BA54
		public Nil? Deserialize(byte[] bytes, int offset, IFormatterResolver typeResolver, out int readSize)
		{
			return new Nil?(MessagePackBinary.ReadNil(bytes, offset, out readSize));
		}

		// Token: 0x04000155 RID: 341
		public static readonly IMessagePackFormatter<Nil?> Instance = new NullableNilFormatter();
	}
}
